/**
 * 
 */
package pruebas.tiendaOl.general;

import javax.enterprise.context.ApplicationScoped;
import javax.faces.context.FacesContext;
import javax.inject.Named;
import javax.servlet.http.HttpSession;

/**Esta clase es para solucionar lo explicado en http://java.net/jira/browse/JAVASERVERFACES-2215
 * @author Gustavo
 * */
@ApplicationScoped
@Named
public class Workarround {
	public static void preRenderView() {
		@SuppressWarnings("unused")
		HttpSession session = (HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(true);
		//tune session params, eg. session.setMaxInactiveInterval(..);

		//perform other pre-render stuff, like setting user context...
	}
}
